```html
<!DOCTYPE html>
<html lang="zh-CN">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>时间戳技术指南 | 技术小馆</title>
    <link rel="stylesheet" href="https://cdn.staticfile.org/font-awesome/6.4.0/css/all.min.css">
    <link rel="stylesheet" href="https://cdn.staticfile.org/tailwindcss/2.2.19/tailwind.min.css">
    <link href="https://fonts.googleapis.com/css2?family=Noto+Serif+SC:wght@400;500;600;700&family=Noto+Sans+SC:wght@300;400;500;700&display=swap" rel="stylesheet">
    <script src="https://cdn.jsdelivr.net/npm/mermaid@latest/dist/mermaid.min.js"></script>
    <style>
        body {
            font-family: 'Noto Sans SC', Tahoma, Arial, Roboto, "Droid Sans", "Helvetica Neue", "Droid Sans Fallback", "Heiti SC", "Hiragino Sans GB", Simsun, sans-serif;
            color: #333;
            line-height: 1.6;
        }
        h1, h2, h3, h4 {
            font-family: 'Noto Serif SC', serif;
            font-weight: 600;
        }
        .hero {
            background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
        }
        .code-block {
            background-color: #f8f9fa;
            border-left: 4px solid #667eea;
        }
        .card {
            transition: transform 0.3s ease, box-shadow 0.3s ease;
        }
        .card:hover {
            transform: translateY(-5px);
            box-shadow: 0 10px 20px rgba(0,0,0,0.1);
        }
        .footer {
            background-color: #1a1a1a;
        }
    </style>
</head>
<body class="bg-gray-50">
    <!-- Hero Section -->
    <section class="hero text-white py-20 px-4 md:px-0">
        <div class="container mx-auto max-w-5xl px-4">
            <div class="flex flex-col items-center text-center">
                <h1 class="text-4xl md:text-5xl font-bold mb-4">时间戳技术完全指南</h1>
                <p class="text-xl md:text-2xl mb-8 max-w-2xl">掌握时间记录的核心技术，提升系统开发效率</p>
                <div class="flex space-x-4">
                    <a href="#definition" class="px-6 py-3 bg-white text-indigo-700 rounded-lg font-medium hover:bg-gray-100 transition duration-300">开始学习</a>
                    <a href="#applications" class="px-6 py-3 border-2 border-white text-white rounded-lg font-medium hover:bg-white hover:text-indigo-700 transition duration-300">应用场景</a>
                </div>
            </div>
        </div>
    </section>

    <!-- Main Content -->
    <main class="container mx-auto max-w-5xl px-4 py-12">
        <!-- Definition Section -->
        <section id="definition" class="mb-16">
            <div class="flex items-center mb-8">
                <div class="w-12 h-12 rounded-full bg-indigo-100 flex items-center justify-center mr-4">
                    <i class="fas fa-clock text-indigo-600 text-xl"></i>
                </div>
                <h2 class="text-3xl font-bold">时间戳的定义</h2>
            </div>
            <div class="bg-white rounded-xl shadow-md p-8">
                <p class="text-lg mb-6">时间戳是一个用来表示特定时刻的数字或字符串，通常以毫秒或秒为单位。从计算机系统的角度来看，时间戳通常是一个长整型数字，表示自某个基准时间（如1970年1月1日00:00:00 UTC）以来的时间量。</p>
                
                <div class="mt-6 grid md:grid-cols-2 gap-6">
                    <div class="card bg-gray-50 rounded-lg p-6">
                        <div class="flex items-center mb-4">
                            <div class="w-10 h-10 rounded-full bg-indigo-100 flex items-center justify-center mr-3">
                                <i class="fas fa-stopwatch text-indigo-600"></i>
                            </div>
                            <h3 class="text-xl font-semibold">UNIX时间戳</h3>
                        </div>
                        <p>自1970年1月1日（UNIX纪元）以来的秒数，广泛应用于各种系统中。</p>
                    </div>
                    <div class="card bg-gray-50 rounded-lg p-6">
                        <div class="flex items-center mb-4">
                            <div class="w-10 h-10 rounded-full bg-indigo-100 flex items-center justify-center mr-3">
                                <i class="fas fa-tachometer-alt text-indigo-600"></i>
                            </div>
                            <h3 class="text-xl font-semibold">高精度时间戳</h3>
                        </div>
                        <p>基于系统的高精度计时器，可达到纳秒级精度，用于性能测试等场景。</p>
                    </div>
                </div>
            </div>
        </section>

        <!-- Generation Methods Section -->
        <section id="generation" class="mb-16">
            <div class="flex items-center mb-8">
                <div class="w-12 h-12 rounded-full bg-indigo-100 flex items-center justify-center mr-4">
                    <i class="fas fa-code text-indigo-600 text-xl"></i>
                </div>
                <h2 class="text-3xl font-bold">常见时间戳生成方式</h2>
            </div>
            
            <div class="grid md:grid-cols-2 gap-8">
                <!-- Seconds Timestamp -->
                <div class="card bg-white rounded-xl shadow-md overflow-hidden">
                    <div class="bg-indigo-100 px-6 py-4">
                        <h3 class="text-xl font-semibold text-indigo-800">秒级时间戳</h3>
                    </div>
                    <div class="p-6">
                        <p class="mb-4">表示自基准时间以来的秒数，适用于大多数通用场景。</p>
                        <div class="code-block p-4 rounded-lg mb-4">
                            <pre class="font-mono text-sm overflow-x-auto"><code class="language-java">long timestampInSeconds = System.currentTimeMillis() / 1000;
System.out.println("秒级时间戳: " + timestampInSeconds);</code></pre>
                        </div>
                        <div class="flex items-center text-gray-600">
                            <i class="fas fa-info-circle mr-2"></i>
                            <span>精度较低，但足以满足日常需求</span>
                        </div>
                    </div>
                </div>
                
                <!-- Milliseconds Timestamp -->
                <div class="card bg-white rounded-xl shadow-md overflow-hidden">
                    <div class="bg-indigo-100 px-6 py-4">
                        <h3 class="text-xl font-semibold text-indigo-800">毫秒级时间戳</h3>
                    </div>
                    <div class="p-6">
                        <p class="mb-4">表示自基准时间以来的毫秒数，提供更高的时间精度。</p>
                        <div class="code-block p-4 rounded-lg mb-4">
                            <pre class="font-mono text-sm overflow-x-auto"><code class="language-java">long timestampInMillis = System.currentTimeMillis();
System.out.println("毫秒级时间戳: " + timestampInMillis);</code></pre>
                        </div>
                        <div class="flex items-center text-gray-600">
                            <i class="fas fa-info-circle mr-2"></i>
                            <span>Java中最常用的时间戳获取方式</span>
                        </div>
                    </div>
                </div>
                
                <!-- Nanoseconds Timestamp -->
                <div class="card bg-white rounded-xl shadow-md overflow-hidden">
                    <div class="bg-indigo-100 px-6 py-4">
                        <h3 class="text-xl font-semibold text-indigo-800">纳秒级时间戳</h3>
                    </div>
                    <div class="p-6">
                        <p class="mb-4">表示自基准时间以来的纳秒数，用于需要极高精度的场景。</p>
                        <div class="code-block p-4 rounded-lg mb-4">
                            <pre class="font-mono text-sm overflow-x-auto"><code class="language-java">long timestampInNanos = System.nanoTime();
System.out.println("纳秒级时间戳: " + timestampInNanos);</code></pre>
                        </div>
                        <div class="flex items-center text-gray-600">
                            <i class="fas fa-info-circle mr-2"></i>
                            <span>主要用于性能测试和时间敏感型操作</span>
                        </div>
                    </div>
                </div>
                
                <!-- ISO 8601 Format -->
                <div class="card bg-white rounded-xl shadow-md overflow-hidden">
                    <div class="bg-indigo-100 px-6 py-4">
                        <h3 class="text-xl font-semibold text-indigo-800">ISO 8601 格式</h3>
                    </div>
                    <div class="p-6">
                        <p class="mb-4">国际标准化组织定义的时间表示格式，易于人类阅读。</p>
                        <div class="code-block p-4 rounded-lg mb-4">
                            <pre class="font-mono text-sm overflow-x-auto"><code class="language-java">import java.time.Instant;
String isoTimestamp = Instant.now().toString();
System.out.println("ISO 8601 时间戳: " + isoTimestamp);</code></pre>
                        </div>
                        <div class="code-block p-4 rounded-lg">
                            <pre class="font-mono text-sm overflow-x-auto"><code class="language-python">from datetime import datetime
iso_timestamp = datetime.utcnow().isoformat()
print("ISO 8601 时间戳:", iso_timestamp)</code></pre>
                        </div>
                    </div>
                </div>
            </div>
        </section>

        <!-- Visualization Section -->
        <section class="mb-16">
            <div class="flex items-center mb-8">
                <div class="w-12 h-12 rounded-full bg-indigo-100 flex items-center justify-center mr-4">
                    <i class="fas fa-project-diagram text-indigo-600 text-xl"></i>
                </div>
                <h2 class="text-3xl font-bold">时间戳精度对比</h2>
            </div>
            
            <div class="bg-white rounded-xl shadow-md p-8">
                <div class="mermaid">
                    graph TD
                    A[时间戳类型] --> B[秒级]
                    A --> C[毫秒级]
                    A --> D[纳秒级]
                    B --> E[精度: 1秒]
                    B --> F[应用: 日志记录]
                    C --> G[精度: 1毫秒]
                    C --> H[应用: 事务处理]
                    D --> I[精度: 1纳秒]
                    D --> J[应用: 性能测试]
                </div>
                <div class="mt-8 grid md:grid-cols-3 gap-6">
                    <div class="text-center">
                        <div class="w-16 h-16 mx-auto rounded-full bg-indigo-100 flex items-center justify-center mb-4">
                            <i class="fas fa-clock text-indigo-600 text-2xl"></i>
                        </div>
                        <h3 class="text-xl font-semibold mb-2">秒级</h3>
                        <p class="text-gray-600">适用于大多数通用场景</p>
                    </div>
                    <div class="text-center">
                        <div class="w-16 h-16 mx-auto rounded-full bg-indigo-100 flex items-center justify-center mb-4">
                            <i class="fas fa-stopwatch text-indigo-600 text-2xl"></i>
                        </div>
                        <h3 class="text-xl font-semibold mb-2">毫秒级</h3>
                        <p class="text-gray-600">Java中最常用的时间戳</p>
                    </div>
                    <div class="text-center">
                        <div class="w-16 h-16 mx-auto rounded-full bg-indigo-100 flex items-center justify-center mb-4">
                            <i class="fas fa-tachometer-alt text-indigo-600 text-2xl"></i>
                        </div>
                        <h3 class="text-xl font-semibold mb-2">纳秒级</h3>
                        <p class="text-gray-600">极高精度需求场景</p>
                    </div>
                </div>
            </div>
        </section>

        <!-- Applications Section -->
        <section id="applications" class="mb-16">
            <div class="flex items-center mb-8">
                <div class="w-12 h-12 rounded-full bg-indigo-100 flex items-center justify-center mr-4">
                    <i class="fas fa-lightbulb text-indigo-600 text-xl"></i>
                </div>
                <h2 class="text-3xl font-bold">时间戳的应用</h2>
            </div>
            
            <div class="grid md:grid-cols-3 gap-6">
                <div class="card bg-white rounded-xl shadow-md p-6">
                    <div class="flex items-center mb-4">
                        <div class="w-10 h-10 rounded-full bg-indigo-100 flex items-center justify-center mr-3">
                            <i class="fas fa-database text-indigo-600"></i>
                        </div>
                        <h3 class="text-xl font-semibold">数据记录</h3>
                    </div>
                    <p>用于记录事件发生的准确时间，如系统日志、用户操作记录等。</p>
                </div>
                <div class="card bg-white rounded-xl shadow-md p-6">
                    <div class="flex items-center mb-4">
                        <div class="w-10 h-10 rounded-full bg-indigo-100 flex items-center justify-center mr-3">
                            <i class="fas fa-sort-amount-up text-indigo-600"></i>
                        </div>
                        <h3 class="text-xl font-semibold">数据排序</h3>
                    </div>
                    <p>在数据库或日志中按时间顺序排列记录，便于分析和查询。</p>
                </div>
                <div class="card bg-white rounded-xl shadow-md p-6">
                    <div class="flex items-center mb-4">
                        <div class="w-10 h-10 rounded-full bg-indigo-100 flex items-center justify-center mr-3">
                            <i class="fas fa-fingerprint text-indigo-600"></i>
                        </div>
                        <h3 class="text-xl font-semibold">数据唯一性</h3>
                    </div>
                    <p>通过时间戳生成唯一标识符，如订单号、事务ID等。</p>
                </div>
            </div>
        </section>

        <!-- Precision Section -->
        <section class="mb-16">
            <div class="flex items-center mb-8">
                <div class="w-12 h-12 rounded-full bg-indigo-100 flex items-center justify-center mr-4">
                    <i class="fas fa-sliders-h text-indigo-600 text-xl"></i>
                </div>
                <h2 class="text-3xl font-bold">时间戳的精度和范围</h2>
            </div>
            
            <div class="bg-white rounded-xl shadow-md p-8">
                <div class="overflow-x-auto">
                    <table class="min-w-full divide-y divide-gray-200">
                        <thead class="bg-gray-50">
                            <tr>
                                <th class="px-6 py-3 text-left text-xs font-medium text-gray-500 uppercase tracking-wider">类型</th>
                                <th class="px-6 py-3 text-left text-xs font-medium text-gray-500 uppercase tracking-wider">精度</th>
                                <th class="px-6 py-3 text-left text-xs font-medium text-gray-500 uppercase tracking-wider">范围</th>
                                <th class="px-6 py-3 text-left text-xs font-medium text-gray-500 uppercase tracking-wider">典型应用场景</th>
                            </tr>
                        </thead>
                        <tbody class="bg-white divide-y divide-gray-200">
                            <tr>
                                <td class="px-6 py-4 whitespace-nowrap text-sm font-medium text-gray-900">秒级</td>
                                <td class="px-6 py-4 whitespace-nowrap text-sm text-gray-500">1秒</td>
                                <td class="px-6 py-4 whitespace-nowrap text-sm text-gray-500">约68年(32位)</td>
                                <td class="px-6 py-4 text-sm text-gray-500">日志记录、系统事件</td>
                            </tr>
                            <tr>
                                <td class="px-6 py-4 whitespace-nowrap text-sm font-medium text-gray-900">毫秒级</td>
                                <td class="px-6 py-4 whitespace-nowrap text-sm text-gray-500">1毫秒</td>
                                <td class="px-6 py-4 whitespace-nowrap text-sm text-gray-500">约293,000年(64位)</td>
                                <td class="px-6 py-4 text-sm text-gray-500">事务处理、业务逻辑</td>
                            </tr>
                            <tr>
                                <td class="px-6 py-4 whitespace-nowrap text-sm font-medium text-gray-900">纳秒级</td>
                                <td class="px-6 py-4 whitespace-nowrap text-sm text-gray-500">1纳秒</td>
                                <td class="px-6 py-4 whitespace-nowrap text-sm text-gray-500">约292年(64位)</td>
                                <td class="px-6 py-4 text-sm text-gray-500">性能测试、高精度计时</td>
                            </tr>
                        </tbody>
                    </table>
                </div>
            </div>
        </section>
    </main>

    <!-- Footer -->
    <footer class="footer text-white py-12">
        <div class="container mx-auto max-w-5xl px-4">
            <div class="flex flex-col items-center text-center">
                <h3 class="text-xl font-semibold mb-2">技术小馆</h3>
                <p class="mb-4">探索技术的无限可能</p>
                <a href="http://www.yuque.com/jtostring" class="text-indigo-300 hover:text-white transition duration-300">http://www.yuque.com/jtostring</a>
            </div>
        </div>
    </footer>

    <script>
        // Initialize Mermaid.js
        mermaid.initialize({
            startOnLoad: true,
            theme: 'default',
            flowchart: {
                useMaxWidth: false,
                htmlLabels: true,
                curve: 'basis'
            }
        });
        
        // Smooth scrolling for anchor links
        document.querySelectorAll('a[href^="#"]').forEach(anchor => {
            anchor.addEventListener('click', function (e) {
                e.preventDefault();
                document.querySelector(this.getAttribute('href')).scrollIntoView({
                    behavior: 'smooth'
                });
            });
        });
    </script>
</body>
</html>
```